<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="icon" href="/asset/bootstrap/favicon.ico">
    <title>用户列表页</title>
    <link href="/asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/asset/bootstrap/css/dashboard.css" rel="stylesheet">
    <link href="/asset/bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <link href="/asset/bootstrap/build/build_standalone.less" rel="stylesheet">    
  </head>
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <a class="navbar-brand" href="#">青迅科技</a>
        </div>
      </div>
    </nav>
    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          <ul class="nav nav-sidebar">
            <li><a href="/user/list">用户列表</a></li>
          </ul>
          <ul class="nav nav-sidebar">
          	<li class="active"><a href="/user/add">新增用户<span class="sr-only">(current)</span></a></li>           
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-1 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">用户管理系统</h1>
          <div class="table-responsive">
            <form action="/user/addSubmit" method="post">  
    			<input type="hidden" name="user.id" value="${user.id}">  
    			<div class="form-group">  
        			<label>用户名</label>  
        			<input type="text" name="user.username" value="${user.username}" style="width: 40%;" class="form-control" placeholder="请输入用户名"/>  
    				<font color="#FF0000">${nameMsg}</font> 
    			</div>  
    			<div class="form-group">  
        			<label>年龄</label>  
        			<input type="text" name="user.age" value="${user.age}" style="width: 40%;" class="form-control" placeholder="请输年龄"/>         
    				<font color="#FF0000">${ageMsg}</font> 
    			</div>  
    			<div class="form-group">  
        			<label>性别</label>  
        		</div>
        		<div class="form-group">
        			<div class="radio-inline">  
        				<input type="radio" name="user.sex" checked="checked" value="1"/>男  
    				</div>  
   	 				<div class="radio-inline">  
        			 	<input type="radio" name="user.sex" value="2"/>女  
    				</div>  
    			 </div> 
    		 	 <div class="form-group">  
        			<label>时间</label>
        			<div id="datetimepicker" class="form-group">  
      					<input type="text" name="user.time" value="${user.time}" style="width: 40%;" placeholder="请选择时间值" readonly class="form_datetime form-control">
        			</div>
        			<font color="#FF0000">${timeMsg}</font>  
   				 </div>   
    			 <div class="form-group">  
        			<label>备注</label>  
        			<textarea name="user.remark" value="${user.remark}" style="height: 70px;width: 40%;" class="form-control" placeholder="请输入备注">${user.remark}</textarea>  
    			 </div>  
    			 <div style="margin-top: 50px">  
        			<button type="submit" class="btn btn-primary" style="width: 120px;margin-right: 50px;">提交</button>
        			<a type="cal" class="btn" href="/user/list" style="width: 120px;background:#999999;color:#FFF;">取消</a>         
    			 </div>  
			</form>
          </div>
        </div>
      </div>
    </div>
    <script src="/asset/bootstrap/js/jquery-1.10.2.min.js"></script>
    <script>window.jQuery || document.write('<script src="/asset/bootstrap/js/jquery-1.10.2.min.js"><\/script>')</script>
    <script src="/asset/bootstrap/js/bootstrap.min.js"></script>
    <script src="/asset/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
   		$(".form_datetime").datetimepicker({
   			minView: "month", //选择日期后，不会再跳转去选择时分秒 
   		    language:  'zh-CN',
   		    format: 'yyyy-mm-dd',
   		    todayBtn:  1,
   		    autoclose: 1,
   		});
    });
	</script> 
  </body>
</html>
